package com.xframe.domain.repository;

import cn.hutool.core.collection.CollUtil;
import com.xframe.domain.BaseModel;
import com.xframe.domain.ModelErrorCode;
import com.xframe.domain.knowledgeBase.VRepairDetail;
import com.xframe.domain.role.IUserCredentials;
import com.xframe.domain.role.SysFullMenu;
import com.xframe.domain.role.SysMenu;
import com.xframe.domain.sys.*;
import com.xframe.domain.views.ModelConfigViewBuilderRunTime;
import com.xframe.xdal.core.DataBaseAccess;
import com.xframe.xdal.core.annotation.XAction;
import com.xframe.xdal.core.exception.DalFrameException;
import com.xframe.xdal.core.model.*;
import com.xframe.xdal.core.model.mapping.ITableInfo;
import com.xframe.xdal.core.model.mapping.TableInfoBuilder;
import com.xframe.xdal.core.tran.XTransaction;
import com.xframe.xdal.core.util.CollectionUtil;
import com.xframe.xdal.core.util.IdCreateUtil;
import com.xframe.xdal.core.util.XReflect;

import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 知识库基础存储
 * @ClassName: ModelBaseRepository
 **/
public class VRepairDetailRepository extends SysBaseRepository {

    @XTransaction
    @XAction(code = "ratifyByBatch",desc = "批准")
    public Integer ratifyByBatch(IModel model, ITableInfo tableInfo) throws DalFrameException {
        if(model instanceof VRepairDetail) {


//            VRepairDetail vRepairDetail = (VRepairDetail)model;
//            RepRepairOrder repRepairOrder = new RepRepairOrder();
//            repRepairOrder.setIsWarehouse(5);
//            repRepairOrder.setRepId(vRepairDetail.getRepId());
//            defDataBaseAccess.update(repRepairOrder);
            System.out.println(999);
        }
        return 0;
    }


}
